Conversation
🦋 Changeset detectedLatest commit: b3dbbad The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
👋 Hi, this pull request contains changes to the source code that github/github-ui depends on. If you are GitHub staff, test these changes with github/github-ui using the integration workflow. Or, apply the |
https://github.com/primer/react into liuliu/add-keyboard-accessible-tooltip-for-actionlist
…d-accessible-tooltip-for-actionlist
…ccessible-tooltip-for-actionlist
| } | ||
|
|
||
| & + .SubGroup { | ||
| & ~ .SubGroup { |
There was a problem hiding this comment.
curious about this change/why its needed 👀
There was a problem hiding this comment.
This change fixes a NavList SubGroup collapse failure(https://github.com/primer/react/actions/runs/22242503448/job/64350808521?pr=7529).
The collapse styling used + to find .SubGroup right after .ActionListContent. When Tooltip wraps the trigger, it adds an extra element between them, so .SubGroup is no longer the immediate next sibling and the + selector does not match.
There was a problem hiding this comment.
Makes sense! My assumption is that there will only be one .SubGroup within the container, so there's no risk of it applying to other sub-groups that are also children of the same container.
|
Looks good! I noticed one small bug on the truncation story: Screen.Recording.2026-03-04.at.6.12.06.AM.movIt seems that the third option doesn't load a tooltip, and the cursor changes rapidly 🤔 |
@TylerJDev Good catch, thanks! This was exposed after we removed The root cause was two separate One question: do you think we should also add |
Thank you for the explanation! I guess with |
This would be the change: - if (!enabled || !text) {
+ if (!enabled) {
return children
}
return (
- <Tooltip ref={forwardedRef} text={text || ''} direction="e" delay="medium">
+ <Tooltip ref={forwardedRef} text={text || ''} direction="e" delay="medium" _privateDisableTooltip={!text}>
{children}
</Tooltip>
)Since text is set asynchronously in a useEffect or non-string descriptions, using |
Gotcha! We can go about adding it back then! |
https://github.com/primer/react into liuliu/add-keyboard-accessible-tooltip-for-actionlist
|
👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/15252 |
Related issue https://github.com/github/accessibility-audits/issues/14802
Changelog
When
ActionList.Descriptionis rendered withtruncate, the full text was only visible via a nativetitleattribute — which only appears on mouse hover, not keyboard focus (WCAG SC 2.1.1).This PR adds a Primer
<Tooltip>at theActionList.Itemlevel that shows the full description text on both hover and keyboard focus when the description is actually truncated.Rollout strategy
Testing & Reviewing
Merge checklist